<?php

function dbconnect()
{
	static $connect = null;
	if ($connect == null)
	{
		$connect = mysql_connect('localhost', 'root', '');
		mysql_select_db('bsc');
	}
	return $connect;
}

function get_news($start_id)
{
	$news_req = mysql_query("
	SELECT * 
	FROM bsc_blog 
	ORDER BY id 
	",dbconnect());
	
	$result = array();
	while ($new = mysql_fetch_array($news_req))
	{
		$result[] = $new;
	}
	return $result;
}

/*
function get_breves($breve_id)
{
	$breves_req = mysql_query("SELECT * FROM bsc_breves ORDER BY id DESC LIMIT '$breves_id', 10");
	return mysql_fetch_array($breves_req);
}
*/
?>